﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PapaetisNew
{
    public partial class frmSupplier : Form
    {
        public frmSupplier()
        {
            InitializeComponent();
            
        }
        
        private void tAL_SUPPLIERBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            try
            {
                
                this.Validate();
                this.tAL_SUPPLIERBindingSource.EndEdit();
                this.tableAdapterManager.UpdateAll(this.suppliers);
                MessageBox.Show("Update successful");
            }
        
        catch (Exception ex)
            {
            MessageBox.Show("Update failed");

            }
        }
    


        private void Form2_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'suppliers.TAL_SUPPLIER' table. You can move, or remove it, as needed.
            Boolean FirstLoad = true;
            this.tAL_SUPPLIERTableAdapter.Fill(this.suppliers.TAL_SUPPLIER);
            

        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void btnSupplierItems_Click(object sender, EventArgs e)
        {

            frmSupplierItems formDig1 = new frmSupplierItems();

            formDig1.Show();
      

        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            frmSupplierItemSearch dgrform = new frmSupplierItemSearch();

            dgrform.Show();
            
        }

        private void sUPPLIERCODETextBox_TextChanged(object sender, EventArgs e)
        {

            
         
            if (sUPPLIERCODETextBox.Text == String.Empty)
            {
                return ;
            } 
            
          
        }

        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {

            

        }
       


    }
}
